From: Jasper St. Pierre Date: Fri, 30 Mar 2012 16:19:13 +0000 (-0400) Subject: gactionmuxer: Fix list_actions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6619 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a36de92bb9a18e889dc50a680302f1124e8e9da1;p=gnome-shell.git gactionmuxer: Fix list_actions The code there before was just completely wrong https://bugzilla.gnome.org/show_bug.cgi?id=673177 --- diff --git a/src/gactionmuxer.c b/src/gactionmuxer.c index 7b49a38d1..d8383064d 100644 --- a/src/gactionmuxer.c +++ b/src/gactionmuxer.c @@ -94,8 +94,20 @@ static gchar ** g_action_muxer_list_actions (GActionGroup *action_group) { GActionMuxer *muxer = G_ACTION_MUXER (action_group); + GHashTableIter iter; + gchar *key; + gchar **keys; + gsize i; - return (gchar **) muxer->groups; + keys = g_new (gchar *, g_hash_table_size (muxer->actions) + 1); + + i = 0; + g_hash_table_iter_init (&iter, muxer->actions); + while (g_hash_table_iter_next (&iter, (gpointer *) &key, NULL)) + keys[i++] = g_strdup (key); + keys[i] = NULL; + + return keys; } static Group *